<template>
  <div class="codesafet">
    <div class="theme">
      <div class="wrapper">
        <h1 class="title">专项测试</h1>
        <h2 class="desc">
          ‌功能测试‌：验证软件是否满足用户需求和规格说明书的要求，确保软件各项功能正常运行‌。<br />
          ‌性能测试‌：测试软件在不同负载下的性能表现，如响应时间、吞吐量、并发数等，以评估软件的效率‌。<br />
          ‌安全测试‌：检查软件系统是否存在潜在的安全漏洞，如网络攻击、数据泄露等，确保软件的安全性‌。<br />
          ‌兼容性测试‌：测试软件在不同硬件、操作系统、浏览器、数据库等平台上的兼容性，确保软件能在多种环境中稳定运行‌。<br />
          ‌可靠性测试‌：评估软件的可靠性和稳定性，检查软件在崩溃、异常、数据损坏等情况下的表现‌。
        </h2>
        <el-button
          class="banner-button"
          size="large"
          type="primary"
          round
          @click="openForm"
        >
          立即体验
        </el-button>
      </div>
    </div>
    <div class="section" style="background-image: none">
      <div class="wrapper">
        <h2 id="yycj" class="section-title">应用场景</h2>
        <div class="section-row" style="display: flex; flex-flow: row wrap">
          <div class="content-wrapper">
            <div class="item">
              <h3 class="sub-title">‌性能评估与优化‌</h3>
              <p class="sub-desc">
                通过性能效率测试，评估软件在特定条件下的响应能力、可扩展性和资源利用率，为性能优化提供数据支持。
              </p>
            </div>
          </div>
          <div class="content-wrapper">
            <div class="item">
              <h3 class="sub-title">‌功能验证与完善‌</h3>
              <p class="sub-desc">
                利用场景法模拟用户操作，验证软件功能的正确实现和异常处理能力，确保软件满足用户需求并具备健壮性。
              </p>
            </div>
          </div>
          <div class="content-wrapper">
            <div class="item">
              <h3 class="sub-title">‌兼容性与稳定性保障‌</h3>
              <p class="sub-desc">
                对软件在不同环境、设备下的表现进行测试，确保软件的兼容性和稳定性，提升用户体验。‌
              </p>
            </div>
          </div>
          <div class="content-wrapper">
            <div class="item">
              <h3 class="sub-title">‌安全漏洞检测与防范‌</h3>
              <p class="sub-desc">
                进行安全测试，检测软件中的潜在安全漏洞，及时修复，保障软件的数据安全和用户隐私。‌
              </p>
            </div>
          </div>
          <div class="content-wrapper">
            <div class="item">
              <h3 class="sub-title">‌项目验收与交付标准‌</h3>
              <p class="sub-desc">
                在软件项目验收阶段，专项测试报告作为重要依据，确保软件达到预期的质量标准，为项目交付提供有力支持。‌
              </p>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div
      class="section"
      style="background-image: none; background-color: #f7f7f7"
    >
      <div class="wrapper">
        <h2 id="bzhff" class="section-title">标准和方法</h2>
        <div class="section-content">
          <p class="sub-desc">
            GB/T25000.51-2016《系统与软件工程
            系统与软件质量要求和评价(SQuaRE)第51部分:就绪可用软件产品(RUSP)的质量要求和测试细则》
            <br />
          </p>
        </div>
      </div>
    </div>
    <div class="section" style="background-image: none">
      <div class="wrapper">
        <h2 id="bzjfw" class="section-title">标准交付物</h2>
        <div class="section-content">
          <div style="display: flex; justify-content: center">
            <img src="@/assets/img/专项测试封皮.png" alt="" />
            <img src="@/assets/img/确认测试目录.png" alt="" style="margin-left: 5%" />
          </div>
        </div>
      </div>
    </div>
    <div class="anchor">
      <el-anchor :offset="70">
        <el-anchor-link
          title="yycj"
          class="ant-anchor-ink"
          @click="goAnchor('#yycj')"
        >
          应用场景
        </el-anchor-link>
        <el-anchor-link
          title="bzhff"
          class="ant-anchor-ink"
          @click="goAnchor('#bzhff')"
        >
          标准和方法
        </el-anchor-link>
        <el-anchor-link
          title="bzjfw"
          class="ant-anchor-ink"
          @click="goAnchor('#bzjfw')"
        >
          标准交付物
        </el-anchor-link>
      </el-anchor>
    </div>
  </div>
  <!-- 创建订单 -->
  <CreateForm ref="formRef" />
</template>

<script setup>
import { ref, computed } from "vue";
import { useUserStore } from "@/store/modules/user";
import CreateForm from "../CreateForm.vue";
import { ElMessage } from "element-plus";
const userStore = useUserStore();
const userInfo = computed(() => userStore.userInfo);
const goAnchor = (selector) => {
  document.querySelector(selector).scrollIntoView({
    behavior: "smooth",
  });
};
/** 创建订单 */
const formRef = ref();
const openForm = () => {
  if (userInfo.value) {
    formRef.value.opendialog(3);
  } else {
    ElMessage({ message: "请先进行用户登录！", type: "warning" });
    userStore.setisShowLogin(true);
  }
};
</script>

<style lang="scss" scope>
.codesafet {
  margin-top: 60px;

  .theme {
    height: 626px;
    width: 100%;
    background: #f7f7f7;
    background-image: url("@/assets/img/bac.jpg");
    background-size: 100% 100%;

    .banner-button {
      width: 12%;
    }

    .wrapper {
      margin: 0 auto;
      max-width: 1232px;
      padding: 167px 16px 0;
      position: relative;
      width: 100%;

      .title {
        color: #333;
        display: inline-block;
        font-size: 42px;
        font-weight: 700;
        margin-bottom: 12px;
        position: relative;
      }

      .desc {
        color: #333;
        font-size: 18px;
        font-weight: 400;
        line-height: 36px;
        margin-bottom: 40px;
         max-width: 820px;
      }
    }
  }

  .section {
    width: 100%;
    background: #fff;
    padding-bottom: 100px;
    background-image: url("@/assets/img/1d0799d2.png");
    background-size: 100% 100%;

    .wrapper {
      height: 100%;
      margin: 0 auto;
      max-width: 1232px;
      padding: 80px 16px 0;

      .section-title {
        margin-bottom: 50px;
        padding: 0 10px;
        color: #000;
        font-size: 32px;
        font-weight: 500;
        margin-bottom: 60px;
        text-align: center;
      }

      .section-content {
        zoom: 1;
        box-sizing: border-box;
        display: block;
        height: auto;
        margin-left: 0;
        margin-right: 0;
        position: relative;
        background-color: #fff;
        box-shadow: 0 20px 60px 0 rgba(0, 0, 0, 0.1);
        padding: 30px;

        .sub-title {
          color: #000;
          font-size: 20px;
          font-weight: 500;
          margin: 30px 0 10px;
        }

        .sub-desc {
          color: #666;
          font-size: 14px;
          line-height: 24px;
          margin-bottom: 30px;
          white-space: pre-line;
        }
      }

      .list-wrapper {
        display: flex;
        justify-content: center;
        margin: 0 -16px;

        .list-item {
          border: 1px solid #e7e7e7;
          border-radius: 4px;
          cursor: pointer;
          display: flex;
          margin: 0 16px 16px;
          min-height: 30px;
          padding: 30px;

          .content {
            flex: 1;

            .title {
              align-items: center;
              display: flex;
              justify-content: space-between;
            }

            // .title:before {
            //     background: #0074ff;
            //     content: "";
            //     height: 15px;
            //     left: -10px;
            //     position: relative;
            //     top: 10px;
            //     transform: translateY(-50%);
            //     width: 5px;
            // }
          }
        }

        .list-item:hover {
          box-shadow: 0 2px 20px 0 rgba(0, 0, 0, 0.1);
        }
      }
    }
    .section-row {
      display: flex;
      flex-flow: row wrap;
      margin: -30px -45px;

      .content-wrapper {
        box-sizing: border-box;
        display: block;
        width: 50%;
        padding: 30px 45px;
        box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.1);

        .item {
          padding: 0 10px;

          .sub-title {
            color: #000;
            font-size: 20px;
            font-weight: 500;
            margin-bottom: 11px;
            position: relative;
          }

          .sub-title:before {
            background: #0074ff;
            content: "";
            height: 20px;
            left: -10px;
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 2px;
          }

          .sub-desc {
            color: #666;
            font-size: 16px;
            line-height: 28px;
            margin: 0;
            white-space: pre-line;
          }
        }
      }
    }
  }

  .anchor {
    position: fixed;
    width: 6%;
    top: 25%;
    left: 5%;
    // transform: translateX(-860px);
    padding: 5px;
    border-radius: 4px;
    background-color: rgb(255, 255, 255);
    box-sizing: border-box;
    box-shadow: 0 5px 16px 0 rgba(0, 0, 0, 0.1);
  }
}
</style>
